package com.server.modules.api.service.impl;

import com.server.common.service.CrudService;
import com.server.modules.api.dao.SysUserAPIDao;
import com.server.modules.api.service.IUserAPIService;
import com.server.modules.api.vo.LoanTypeListVo;
import com.server.modules.sys.dao.UserDao;
import com.server.modules.sys.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/9/9.
 */
@Service
public class UserAPIService extends CrudService<SysUserAPIDao, User> implements IUserAPIService {
    @Autowired
    private UserDao userDao;

    @Autowired
    private SysUserAPIDao sysUserAPIDao;
    @Override
    public List<User> getMembersByLoanId(LoanTypeListVo vo) {
            return  dao.getMembersByLoanId(vo);
    }
    @Override
    public User getUserById(String id) {
        return userDao.get(id);
    }

    @Override
    public User getUserByHxId(String hxId) {
        return sysUserAPIDao.getUserByHxId(hxId);
    }

    @Override
    public User getUserByPhoneNum(String phoneNum) {
        return sysUserAPIDao.getUserByPhoneNum(phoneNum);
    }


}
